
func void B_MM_AssessEnemy()
{
	var C_Npc pcl;
	var C_Npc mgo;
	var C_Npc lar;
	if((self.guild == GIL_DRAGON) && (Npc_HasItems(hero,ItMi_InnosEye_MIS) >= 1) && (self.aivar[AIV_MM_REAL_ID] != ID_DRAGON_BLACK))
	{
		return;
	};
	if((PRESTARTBIGBATTLE == TRUE) && (STARTBIGBATTLE == FALSE) && (self.guild == GIL_ORC) && (other.guild < GIL_SEPERATOR_HUM) && (Npc_GetDistToWP(self,"BIGFIGHT") < 5000))
	{
		return;
	};
	if((STARTBIGBATTLE == TRUE) && (CANATTACKBIGBATTLE == FALSE) && (self.guild == GIL_ORC) && (other.guild < GIL_SEPERATOR_HUM))
	{
		return;
	};
	if((Hlp_GetInstanceID(other) == Hlp_GetInstanceID(dmt_1212_dagot)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(dmt_121200_dagot)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(dmt_1213_morius)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(dmt_1214_tegon)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(dmt_1215_kelios)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(dmt_1216_demos)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(dmt_1217_farion)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(dmt_1218_gader)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(dmt_1219_narus)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(dmt_1220_wakon)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(dmt_1297_stonnos)))
	{
		return;
	};
	if((Hlp_GetInstanceID(other) == Hlp_GetInstanceID(SLD_801_Torlof)) && (TORLOFCAPTURED == TRUE) && (TORLOFISFREE == FALSE))
	{
		return;
	};
	if((Hlp_GetInstanceID(other) == Hlp_GetInstanceID(DJG_705_Angar_NW)) && (ANGARCAPTURED == TRUE) && (ANGARISFREE == FALSE))
	{
		return;
	};
	if((Hlp_GetInstanceID(other) == Hlp_GetInstanceID(SLD_811_Wolf)) && (WOLFCAPTURED == TRUE) && (WOLFISFREE == FALSE))
	{
		return;
	};
	if((Hlp_GetInstanceID(other) == Hlp_GetInstanceID(VLK_449_Lares)) && (LARESCAPTURED == TRUE) && (LARESISFREE == FALSE))
	{
		return;
	};
	if((Hlp_GetInstanceID(other) == Hlp_GetInstanceID(Pal_207_Girion)) && (GIRIONCAPTURED == TRUE) && (GIRIONISFREE == FALSE))
	{
		return;
	};
	if((Hlp_GetInstanceID(other) == Hlp_GetInstanceID(SLD_809_Bennet)) && (BENNETCAPTURED == TRUE) && (BENNETISFREE == FALSE))
	{
		return;
	};
	if((self.aivar[AIV_MM_REAL_ID] == ID_DRAGON_BLACK) && (DRAGONBLACKMEET == FALSE))
	{
		return;
	};
	if((self.aivar[AIV_NoFightParker] == TRUE) || (other.aivar[AIV_NoFightParker] == TRUE))
	{
		return;
	};
	if((self.aivar[AIV_EnemyOverride] == TRUE) && (other.guild < GIL_SEPERATOR_HUM))
	{
		return;
	};
	if((self.aivar[AIV_MM_REAL_ID] == ID_SUMMONED_DEMON) || (self.aivar[AIV_MM_REAL_ID] == ID_SUMMONED_WOLF) || (self.aivar[AIV_MM_REAL_ID] == ID_SUMMONED_GOBBO_SKELETON) || (self.aivar[AIV_MM_REAL_ID] == ID_SUMMONED_SKELETON) || (self.aivar[AIV_MM_REAL_ID] == ID_SummonedGuardian) || (self.aivar[AIV_MM_REAL_ID] == ID_SummonedZombie) || (self.aivar[AIV_MM_REAL_ID] == ID_SUMMONED_SWAMPDRONE) || (self.aivar[AIV_MM_REAL_ID] == ID_SUMMONED_GOLEM))
	{
		return;
	};
	if(other.aivar[AIV_INVINCIBLE] == TRUE)
	{
		return;
	};
	if(Npc_IsPlayer(other) && (DAGOTTELLALL == FALSE) && ((Hlp_GetInstanceID(self) == Hlp_GetInstanceID(demondagot_01)) || (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(demondagot_02)) || (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(demondagot_03)) || (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(demondagot_04))))
	{
		return;
	};
	if(Npc_IsPlayer(other) && (DAGOTHIDEONCE == FALSE) && (DAGOTTELLALL == TRUE) && ((Hlp_GetInstanceID(self) == Hlp_GetInstanceID(demondagot_01)) || (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(demondagot_02)) || (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(demondagot_03)) || (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(demondagot_04))))
	{
		DAGOTHIDEONCE = TRUE;
		Npc_ExchangeRoutine(dmt_121200_dagot,"Start");
		AI_Teleport(dmt_121200_dagot,"TOT");
	};
	if(Npc_IsPlayer(other) && (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(orc_8566_urhan)) && (URHANSPEAKBEFOREBATTLE == TRUE) && (URHANBEATEN == TRUE) && (MIS_CHALLANGEORC == LOG_Running))
	{
		return;
	};
	if(Npc_IsPlayer(other) && (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(orc_8566_urhan)))
	{
		if((MIS_CHALLANGEORC == LOG_Running) && (HAGTARISINSERTED == TRUE) && (URHANSPEAKBEFOREBATTLE == FALSE))
		{
			return;
		};
		if(URHANFUCKOFF == TRUE)
		{
			Npc_ClearAIQueue(self);
			Npc_SetTarget(self,other);
			B_ClearPerceptions(self);
			AI_StartState(self,ZS_MM_Attack,0,"");
			return;
		};
	};
	if(Npc_IsPlayer(other) && (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(orc_8550_urnazul)))
	{
		if(URNAZULFUCKOFF == TRUE)
		{
			Npc_ClearAIQueue(self);
			Npc_SetTarget(self,other);
			B_ClearPerceptions(self);
			AI_StartState(self,ZS_MM_Attack,0,"");
			return;
		};
	};
	if(Npc_IsPlayer(other) && (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(orc_8566_urhan)) && (URHANSPEAKBEFOREBATTLE == TRUE) && (URHANBEATEN == FALSE) && (MIS_CHALLANGEORC == LOG_Running))
	{
		Npc_ClearAIQueue(self);
		Npc_SetTarget(self,other);
		B_ClearPerceptions(self);
		AI_StartState(self,ZS_MM_Attack,0,"");
		return;
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(scavenger_sprint))
	{
		Npc_SetTarget(self,other);
		Npc_ClearAIQueue(self);
		AI_StartState(self,ZS_MM_Flee,0,"");
		return;
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(shemron_demon))
	{
		if((SHEMRON_TALK == FALSE) && (KNOWDEMENTORLANGUAGE == TRUE) && (Npc_HasItems(hero,itmi_darkshpere) >= 1))
		{
			return;
		};
		if((SHEMRON_FIGHT == FALSE) && (SHEMRON_TALK == TRUE))
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(eligor_demon))
	{
		return;
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(xardas_goblin))
	{
		if(XARDASGOBLINHUNT == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(senyak_demon))
	{
		if(TALKSENYAK == FALSE)
		{
			return;
		};
	};
	if((self.guild == GIL_SKELETON) || (self.guild == GIL_ZOMBIE) || (self.guild == GIL_DEMON) || (self.guild == GIL_GOBBO_SKELETON) || (self.guild == GIL_SKELETON_MAGE))
	{
		if((Hlp_GetInstanceID(other) == Hlp_GetInstanceID(NONE_100_Xardas)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(none_102_kreol)))
		{
			return;
		};
	};
	pcl = Hlp_GetNpc(PC_Levelinspektor);
	if(Hlp_GetInstanceID(other) == Hlp_GetInstanceID(pcl))
	{
		return;
	};
	mgo = Hlp_GetNpc(MagicGolem);
	lar = Hlp_GetNpc(VLK_449_Lares);
	if((Hlp_GetInstanceID(other) == Hlp_GetInstanceID(lar)) && (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(mgo)))
	{
		return;
	};
	if(Npc_GetDistToWP(self,"OC_RAMP_07") <= 500)
	{
		return;
	};
	if(Npc_GetDistToWP(self,"WP_COAST_PATH_08") <= 500)
	{
		return;
	};
	if(other.aivar[AIV_INVINCIBLE] == TRUE)
	{
		return;
	};
	if((C_BodyStateContains(other,BS_SWIM) || C_BodyStateContains(other,BS_DIVE)) && (self.aivar[AIV_MM_FollowInWater] == FALSE))
	{
		return;
	};
	if(Npc_GetHeightToNpc(self,other) > PERC_DIST_HEIGHT)
	{
		return;
	};
	if(Npc_IsPlayer(other) && (other.guild > GIL_SEPERATOR_HUM))
	{
		if(Wld_GetGuildAttitude(self.guild,other.guild) != ATT_HOSTILE)
		{
			return;
		};
	};
	if(self.senses_range > PERC_DIST_MONSTER_ACTIVE_MAX)
	{
		if(Npc_GetDistToNpc(self,other) > PERC_DIST_MONSTER_ACTIVE_MAX)
		{
			if(!Npc_CanSeeNpc(self,other))
			{
				return;
			};
		};
	};
	if((self.guild == GIL_ORC) || (self.guild == GIL_FRIENDLY_ORC) || (self.guild == GIL_SEPERATOR_ORC))
	{
		if(C_BodyStateContains(other,BS_SNEAK) || C_BodyStateContains(other,BS_STAND))
		{
			if(!Npc_CanSeeNpc(self,other))
			{
				return;
			};
		};
		if(Npc_IsPlayer(other) && (ULUMULUISEQUIP == TRUE))
		{
			return;
		};
		if(Npc_IsPlayer(other) && (Npc_HasItems(other,itmi_orcmaintotem) >= 1))
		{
			return;
		};
	};
	if((SAFEFLAGPALADIN == TRUE) && (PALADINAWAYORC == FALSE))
	{
		if((self.guild == GIL_ORC) || (self.aivar[AIV_MM_REAL_ID] == ID_WARG))
		{
			if(Npc_IsPlayer(other) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(PAL_250_Garond)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(PAL_251_Oric)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(PAL_252_Parcival)) || (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(PAL_268_Udar)))
			{
				return;
			};
		};
	};
	if((self.guild == GIL_GOBBO) || (self.guild == GIL_SCAVENGER) || (self.guild == GIL_Giant_Rat) || (self.guild == GIL_GIANT_BUG) || (self.guild == GIL_BLOODFLY) || (self.guild == GIL_WARAN) || (self.guild == GIL_MINECRAWLER) || (self.guild == GIL_LURKER) || (self.guild == GIL_SNAPPER) || (self.guild == GIL_SHADOWBEAST) || (self.guild == GIL_HARPY) || (self.guild == GIL_STONEGOLEM) || (self.guild == GIL_FIREGOLEM) || (self.guild == GIL_ICEGOLEM) || (self.guild == GIL_TROLL) || (self.guild == GIL_SWAMPSHARK) || (self.guild == GIL_MOLERAT) || (self.guild == GIL_Alligator) || (self.guild == GIL_SWAMPGOLEM) || (self.guild == GIL_Gargoyle) || (self.guild == GIL_DRACONIAN) || (self.guild == GIL_WOLF) || (self.guild == GIL_GOBBO_SKELETON) || (self.guild == GIL_SKELETON) || (self.guild == GIL_ZOMBIE) || (self.guild == GIL_SHADOWBEAST_SKELETON))
	{
		if(C_BodyStateContains(other,BS_SNEAK) || C_BodyStateContains(other,BS_STAND))
		{
			if(!Npc_CanSeeNpc(self,other))
			{
				return;
			};
		};
	};
	if(!Npc_CanSeeNpcFreeLOS(self,other))
	{
		return;
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(alef_soul))
	{
		if(TALKTOALEF == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_1))
	{
		if(GOMEZSOULTALK_1 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_2))
	{
		if(GOMEZSOULTALK_2 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_3))
	{
		if(GOMEZSOULTALK_3 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_4))
	{
		if(GOMEZSOULTALK_4 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_5))
	{
		if(GOMEZSOULTALK_5 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_6))
	{
		if(GOMEZSOULTALK_6 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_7))
	{
		if(GOMEZSOULTALK_7 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_8))
	{
		if(GOMEZSOULTALK_8 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_9))
	{
		if(GOMEZSOULTALK_9 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_10))
	{
		if(GOMEZSOULTALK_10 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_11))
	{
		if(GOMEZSOULTALK_11 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_12))
	{
		if(GOMEZSOULTALK_12 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_13))
	{
		if(GOMEZSOULTALK_13 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_14))
	{
		if(GOMEZSOULTALK_14 == FALSE)
		{
			return;
		};
	};
	if(Hlp_GetInstanceID(self) == Hlp_GetInstanceID(gomezworkersoul_15))
	{
		if(GOMEZSOULTALK_15 == FALSE)
		{
			return;
		};
	};
	if(self.aivar[AIV_PARTYMEMBER] == TRUE)
	{
		if(other.npcType == NPCTYPE_FRIEND)
		{
			return;
		};
		Npc_ClearAIQueue(self);
		Npc_SetTarget(self,other);
		B_ClearPerceptions(self);
		AI_StartState(self,ZS_MM_Attack,0,"");
		return;
	};
	if(self.aivar[AIV_MM_ThreatenBeforeAttack] == FALSE)
	{
		Npc_ClearAIQueue(self);
		Npc_SetTarget(self,other);
		B_ClearPerceptions(self);
		AI_StartState(self,ZS_MM_Attack,0,"");
		return;
	};
	if(Npc_IsInState(self,ZS_MM_EatBody))
	{
		if(Npc_GetDistToNpc(self,other) <= FIGHT_DIST_MONSTER_ATTACKRANGE)
		{
			Npc_ClearAIQueue(self);
			Npc_SetTarget(self,other);
			B_ClearPerceptions(self);
			AI_StartState(self,ZS_MM_Attack,0,"");
			return;
		};
		return;
	};
	if(Npc_IsInState(self,ZS_MM_Hunt))
	{
		if(Npc_GetDistToNpc(self,other) <= FIGHT_DIST_MONSTER_ATTACKRANGE)
		{
			Npc_ClearAIQueue(self);
			Npc_SetTarget(self,other);
			B_ClearPerceptions(self);
			AI_StartState(self,ZS_MM_Attack,0,"");
			return;
		}
		else
		{
			return;
		};
	};
	if(C_PredatorFoundPrey(self,other))
	{
		Npc_ClearAIQueue(self);
		Npc_SetTarget(self,other);
		B_ClearPerceptions(self);
		AI_StartState(self,ZS_MM_Hunt,0,"");
		return;
	};
	if(C_PredatorFoundPrey(other,self))
	{
		if(!Npc_IsInState(other,ZS_MM_Hunt) && (Npc_GetDistToNpc(self,other) <= FIGHT_DIST_MONSTER_FLEE))
		{
			Npc_ClearAIQueue(self);
			Npc_SetTarget(self,other);
			B_ClearPerceptions(self);
			AI_StartState(self,ZS_MM_Flee,0,"");
			return;
		}
		else
		{
			return;
		};
	};
	Npc_ClearAIQueue(self);
	B_ClearPerceptions(self);
	AI_StartState(self,ZS_MM_ThreatenEnemy,0,"");
};

